
#! /bin/bash
export LANG=zh_CN.UTF-8
HIVE_HOME=/usr/bin/hive


${HIVE_HOME} -S -e "

drop table if exists zxedu_rpt.signup_dt_school;
create table if not exists zxedu_rpt.signup_dt_school
(   dt              string,
    school_id       int,
    schoool_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_month_school;
create table if not exists zxedu_rpt.signup_month_school
(   mongth_code     string,
    school_id       int,
    schoool_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_year_school;
create table if not exists zxedu_rpt.signup_year_school
(   year_code       string,
    school_id       int,
    schoool_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_dt_origintype_school;
create table if not exists zxedu_rpt.signup_dt_origintype_school
(   dt              string,
    origin_type     string,
    school_id       int,
    schoool_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_mongth_origintype_school;
create table if not exists zxedu_rpt.signup_mongth_origintype_school
(   month_code      string,
    origin_type     string,
    school_id       int,
    schoool_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

    drop table if exists zxedu_rpt.signup_year_origintype_school;
create table if not exists zxedu_rpt.signup_year_origintype_school
(   year_code      string,
    origin_type     string,
    school_id       int,
    schoool_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_dt_origintype_tdepart;
create table if not exists zxedu_rpt.signup_dt_origintype_tdepart
(   dt              string,
    origin_type     string,
    tdepart_id       int,
    tdepart_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_month_origintype_tdepart;
create table if not exists zxedu_rpt.signup_month_origintype_tdepart
(   month_code      string,
    origin_type     string,
    tdepart_id      int,
    tdepart_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_year_origintype_tdepart;
create table if not exists zxedu_rpt.signup_year_origintype_tdepart
(   year_code       string,
    origin_type     string,
    tdepart_id       int,
    tdepart_name    string,
    signup_count    bigint)
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_dt_origintype_relationship;
create table if not exists zxedu_rpt.signup_dt_origintype_relationship
(   dt                         string,
    origin_type                string,
    rate_signup_relationship   decimal(5,2))
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_month_origintype_relationship;
create table if not exists zxedu_rpt.signup_month_origintype_relationship
(   month_code                 string,
    origin_type                string,
    rate_signup_relationship   decimal(5,2))
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_year_origintype_relationship;
create table if not exists zxedu_rpt.signup_year_origintype_relationship
(   year_code                  string,
    origin_type                string,
    rate_signup_relationship   decimal(5,2))
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_dt_origintype_effectiveclue;
create table if not exists zxedu_rpt.signup_dt_origintype_effectiveclue
(   dt                          string,
    origin_type                 string,
    rate_signup_effectiveclue   decimal(5,2))
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_month_origintype_effectiveclue;
create table if not exists zxedu_rpt.signup_month_origintype_effectiveclue
(   month_code                  string,
    origin_type                 string,
    rate_signup_effectiveclue   decimal(5,2))
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');

drop table if exists zxedu_rpt.signup_year_origintype_effectiveclue;
create table if not exists zxedu_rpt.signup_year_origintype_effectiveclue
(   year_code                   string,
    origin_type                 string,
    rate_signup_effectiveclue   decimal(5,2))
row format delimited fields terminated by '\t'
stored AS orc tblproperties ('orc.compress' = 'SNAPPY');
"